package com.heima.admin.controller.v1;

import com.heima.admin.service.AdminWmNewsService;
import com.heima.model.admin.dtos.NewsAuthDto;
import com.heima.model.common.dtos.ResponseResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/api/v1/news")
public class AdminWmNewsController {

    @Autowired
    private AdminWmNewsService adminWmNewsService;
    /**
     * 审核失败
     */

    @PostMapping("/auth_fail")
    public ResponseResult authFail(@RequestBody NewsAuthDto dto){
        return adminWmNewsService.authFail(dto);
    }
    /**
     * 审核成功
     */
    @PostMapping("/auth_pass")
    public ResponseResult authPass(@RequestBody NewsAuthDto dto){
        return adminWmNewsService.authPass(dto);
    }


}
